#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>

#define LEN 10

void delet(int* arr,int len,int del)
{
	int i = 0;
	for(i=0;i<len;i++)
	{
		if (arr[i] != del)
		{
			printf("%d", arr[i]);
			break;
		}
	}
	i++;
	for (;i < len;i++)
	{
		if (arr[i] != del)
			printf(" %d", arr[i]);
	}

}

int main()
{
	int arr[LEN] = { 0 };
	int i = 0;
	for (i = 0;i < LEN;i++)
		scanf("%d", &arr[i]);
	int del = 0;
	scanf("%d", &del);
	delet(arr,LEN,del);
	return 0;
}
